package date;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateParameterTest {
	public static void main(String[] args) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		Date date = new Date(115, 6, 21);
		System.out.println("原来的日期"+sdf.format(date));
		updateDate(date);
		System.out.println("更新日期后"+sdf.format(date));
		replaceDate(date);
		System.out.println("替换日期后"+sdf.format(date));
	}

	private static void replaceDate(Date date) {
		date = new Date(110, 8, 9);
	}

	private static void updateDate(Date date) {
		date.setDate(date.getDate()+1);
	}
}
